From bc77a64b00d1b014c495ba2465a15554f1189170 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Tue, 23 May 2006 17:05:27 -0600 Subject: [PATCH] [IA64] work around ENOSYS vs EINVAL in ioremap We should not panic the domain for an EINVAL return from the ioremap hyerpcall. This was only meant for ENOSYS. Long term this is probably not the best place for this kind of sanity checking. Signed-off-by: Alex Williamson --- linux-2.6-xen-sparse/include/asm-ia64/hypercall.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h index 81c8c7ee4e..45f65ebc2a 100644 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h @@ -431,10 +431,12 @@ HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long size) unsigned long ret = ioaddr; if (running_on_xen) { ret = __HYPERVISOR_ioremap(ioaddr, size); - if (unlikely(IS_ERR_VALUE(ret))) + if (unlikely(ret == -ENOSYS)) panic("hypercall %s failed with %ld. " "Please check Xen and Linux config mismatch\n", __func__, -ret); + else if (unlikely(IS_ERR_VALUE(ret))) + ret = ioaddr; } return ret; } -- 2.30.2